package su.service.impl;

import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import su.dao.EmpDao;
import su.domain.Emp;
import su.service.EmpService;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service("EmpServiceImpl")
public class EmpServiceImpl implements EmpService {

    @Autowired
    private EmpDao empDao;



    @Override
    public List<Emp> listwithdep(int pagenum, int pagesize) {
        return empDao.listwithdep(pagenum, pagesize);
    }



    @Override
    public void saveemp(Emp emp) {
        empDao.saveemp(emp);
    }

    @Override
    public Emp findbyname(String name) {
        return empDao.findbyname(name);
    }

    @Override
    public Emp findbyid(Integer id) {
        return empDao.findbyid(id);
    }

    @Override
    public Integer updatebyid(Emp emp) {
        return empDao.updatebyid(emp);
    }

    @Override
    public Integer delempbyid(Integer id) {
        return empDao.delempbyid(id);
    }

    @Override
    public Integer delempall(List<Integer> ids) {
        return empDao.delempall(ids);
    }
}
